10th international ABINIT developer workshop
20-22nd May 2019 - Louvain-la-Neuve, Belgium

Use the Space key to navigate through all slides.

Internal implementation (abipy.flowtk Flows):
AbiFlows package (requires Fireworks and MongoDB database)
NB: There's an ongoing effort to reimplement AbiFlows in terms of the atomate framewors
Using conda (recommended):
conda install abipy --channel conda-forge
Recipes for AbiPy and ABINIT are now supported by the conda-forge community 🎉
This means that:
Since conda is not limited to python packages, one can install ABINIT in the same env with:
conda install abinit -c conda-forge
Using pip and python wheels:
pip install abipy --user
From the github repository (develop mode):
git clone https://github.com/abinit/abipy.git
cd abipy
python setup.py develop
For further info see http://abinit.github.io/abipy/installation.html
%embed https://abinit.github.io/abipy/index.html
%embed https://abinit.github.io/abipy/gallery/plot_phbands_nkpt_tsmear.html#sphx-glr-gallery-plot-phbands-nkpt-tsmear-py
%embed https://nbviewer.jupyter.org/github/abinit/abitutorials/blob/master/abitutorials/index.ipynb
New Flows to compute:
New flows and post-processing tools for:
(contributed by G. Petretto)
Based on py script by A. Romero. ...
Applications:
Example: obtain irreps from DDB using phonopy
Flow to run DFPT calculations to compute:
scf_input = make_scf_input() # Build input for GS calculation
elast_work = flowtk.ElasticWork.from_scf_input(scf_input,
with_relaxed_ion=True,
with_piezo=True)

Flow to run DFPT calculations to compute:
Flow to run DFPT calculations to compute:
This example shows how to compute the e-ph matrix elements in AlAs along a q-path with AbiPy flows. The final results are stored in the GKQ.nc file (one file for q-point) in the outdata of each task.
# Build input for GS calculation on a 2x2x2 k-mesh
scf_input = make_scf_input(ngkpt=(2, 2, 2))
# q-mesh for phonons
ngqpt = (2, 2, 2)
# Create flow to compute all the independent atomic perturbations
# Use ndivsm = 0 to pass an explicit list of q-points.
# If ndivsm > 0, qpath_list is interpreted as a list of boundaries for the q-path
qpath_list = [[0.0, 0.0, 0.0], [0.01, 0, 0], [0.1, 0, 0],
[0.24, 0, 0], [0.3, 0, 0], [0.45, 0, 0], [0.5, 0.0, 0.0]]
from abipy.flowtk.eph_flows import GkqPathFlow
flow = GkqPathFlow.from_scf_input("flow_dir", scf_input,
ngqpt, qpath_list, ndivsm=0, with_becs=True,
ddk_tolerance={"tolwfr": 1e-8})

https://abinit.github.io/abipy/flow_gallery/run_gkq.html#sphx-glr-flow-gallery-run-gkq-py


gsr = abiopen("si_nscf_GSR.nc")
gsr.ebands.plot(with_gaps=True);
gsr.ebands.plotly(with_gaps=True);
gsr.ebands.plotly(with_gaps=True, chart_studio=True);
%embed https://chart-studio.plotly.com/~gmatteo/214
gsr.ebands.kpoints.plotly();
gsr.ebands.kpoints.plot();

Thanks to this infrastructure, developers can use python to solve the scientific problem using the pydata ecosystem and the packages developed by the ab-initio community.

To build a panel GUI inside the notebook, use:
ddb = abilab.abiopen("ZnSe_hex_qpt_DDB")
abilab.abipanel();
ddb.get_panel()
ddb.structure.get_panel()
To create a panel dashboard associated to the DDB file, use:
abiopen.py ZnSe_hex_qpt_DDB --panel # or -pn if you prefer the short version.
abiopen.py mgb2_kpath_FATBANDS.nc --expose --seaborn
abiopen.py mgb2_kpath_FATBANDS.nc --expose-web # -ewb
abiopen.py mgb2_kpath_FATBANDS.nc --plotly # -ply

to get a quick look at the results
abiview.py ddb ZnSe_hex_qpt_DDB --panel # or -pn if you prefer the short version.
## Documentation of new features available at:
%embed https://abinit.github.io/abipy/graphical_interface.html
abiview.py ddb ZnSe_hex_qpt_DDB --seaborn
!abicomp.py structure *.cif si_nscf_GSR.nc `find . -name *_DDB`
zsh:1: no matches found: *.cif
find inside backticks (bash rocks!)¶paths = [
"mgb2_888k_0.01tsmear_DDB",
"mgb2_888k_0.04tsmear_DDB",
"mgb2_121212k_0.01tsmear_DDB",
"mgb2_121212k_0.04tsmear_DDB",
]
paths = [os.path.join(abidata.dirpath, "refs", "mgb2_phonons_nkpt_tsmear", f)
for f in paths]
robot = abilab.DdbRobot()
for i, path in enumerate(paths):
robot.add_file(path, path)
# Define function to change labels:
func = lambda ddb: "nkpt: %s, tsmear: %.2f" % (
ddb.header["nkpt"], ddb.header["tsmear"])
robot.remap_labels(func)
robot
robot.get_params_dataframe()
| nkpt | nsppol | ecut | tsmear | occopt | ixc | nband | usepaw | |
|---|---|---|---|---|---|---|---|---|
| nkpt: 256, tsmear: 0.01 | 256 | 1 | 35.0 | 0.01 | 4 | 1 | 8 | 0 |
| nkpt: 256, tsmear: 0.04 | 256 | 1 | 35.0 | 0.04 | 4 | 1 | 8 | 0 |
| nkpt: 864, tsmear: 0.01 | 864 | 1 | 35.0 | 0.01 | 4 | 1 | 8 | 0 |
| nkpt: 864, tsmear: 0.04 | 864 | 1 | 35.0 | 0.04 | 4 | 1 | 8 | 0 |
robot.get_lattice_dataframe()
| formula | natom | alpha | beta | gamma | a | b | c | volume | abispg_num | spglib_symb | spglib_num | spglib_lattice_type | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| nkpt: 256, tsmear: 0.01 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
| nkpt: 256, tsmear: 0.04 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
| nkpt: 864, tsmear: 0.01 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
| nkpt: 864, tsmear: 0.04 | Mg1 B2 | 3 | 90.0 | 90.0 | 120.0 | 3.086 | 3.086 | 3.523 | 29.055953 | 0 | P6/mmm | 191 | hexagonal |
# Invoke anaddb and store results
r = robot.anaget_phonon_plotters(nqsmall=2)
r.phbands_plotter.gridplot_with_hue("tsmear", with_dos=True);
Use AbiPy programmatic interface to implement: